<?php

class Henry_Controller_Action extends Zend_Controller_Action 
{
	protected $language;
	public function init() 
	{
		parent::init();
		$this->initLayout();
		$this->initAuth();
	}
	private function initAuth()
	{
		$request = $this->_request;
		if ($request->getModuleName()=='cms')//Chung thuc chi su dung cho cms
		{
			if (!Zend_Auth::getInstance()->hasIdentity())
			{
				$this->_redirect("cms/authentication/login");
			}
		}
	}
	//-------------------------------
	public function initLayout() 
	{
            $this->view->sesstion_id = Zend_Session::getId();
            $access = new Henry_Access();
            $access->add(Zend_Session::getId());
		Henry_CreateThemes::create($this->view,$this->_request->getModuleName());
	}
}

?>